﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace logic
{
    public class TableGenerator : Generator
    {
        private Random rand = new Random();

        public override int getNumber(bool[] tavola)
        {
            List<int> lista = new List<int>();
            int ris;

            for (int i = 0; i < tavola.Length; i++)
                if (!tavola[i])
                    lista.Add(i);

            ris = rand.Next(lista.Count);

            return lista[ris];
        }
    }
}
